import { request } from '@/utils/http';

/**
 * 系统配置
 * @returns
 */
export function getSystemConfig() {
	return request.get('/api/index/config');
}

export function getBannerList(params = {}) {
	return request.post('/api/banner/list', params);
}

/**
 * 首页数据
 */
export function getHomeData() {
	return request.get('/api/index/index');
}

/**
 * 团队
 */
export function getTeamData() {
	return request.get('/api/index/team');
}
/**
 * 认证
 */
export function getCertificationList(params = {}) {
	return request.post('/api/certification/list', params);
}
/**
 * 服务
 */
export function getServiceList(params = {}) {
	return request.post('/api/service/list', params);
}

export function getTournamentDetail(params = {}) {
	return request.get('/api/tournament/detail', { params: params });
}

/**
 * 训练接话列表
 * @param {*} params
 * @returns
 */
export function getTrainingPlanList(params = {}) {
	return request.post('/api/training_plan/list', params);
}

/**
 * 课程目录
 */
export function getCourseDirectory(params = {}) {
	return request.post('/api/course/directory', params);
}
/**
 * 课程详情
 * @returns
 */
export function getLessonDetail(params = {}) {
	return request.post('/api/course/lesson', params);
}

/**
 * 报名
 * @param {*} params
 * @returns
 */
export function courseApply(params = {}) {
	return request.post('/api/course/apply', params);
}

/**
 * 订单支付
 */
export function orderPay(params = {}) {
	return request.post('/api/orders/pay', params);
}

/**
 * 教练等级
 */
export function getLevelList() {
	return request.post('/api/level/selectlist');
}
